<template>
    <div class="container">
    	<header-compent></header-compent>
    	<div class="page-header">
    		   	<el-page-header content="人员管理"></el-page-header>
    		   
    	</div>
    	<div class="page-body">
		<el-tabs type="border-card">
		  <el-tab-pane>
		    <span slot="label"><i class="el-icon-user-solid"></i> 当前企业名下使用人员名单</span>
		    	<div class="userBox">
		    		<el-table
				      :data="tableData"
				      style="width: 100%;height:100%;">
				      <el-table-column
				        prop="date"
				        label="日期"
				        width="180">
				      </el-table-column>
				      <el-table-column
				        prop="name"
				        label="姓名"
				        width="180">
				      </el-table-column>
				      <el-table-column
				        prop="address"
				        label="地址">
				      </el-table-column>
				    </el-table>
					 
				</div>
		  </el-tab-pane>
		  <el-tab-pane label="">
		  	<span slot="label"><i class="el-icon-user"></i>当前企业通讯录名单</span>
		  	xxx
		  </el-tab-pane>

		</el-tabs>
		</div>
	
	

 
    </div>
</template>

<script>
import { postAuthLogin } from "../api/login";	
import Cookies from "js-cookie";
import HeaderCompent from "./header.vue";
export default {
  name: 'index',
   components: {
	HeaderCompent
  },
  data () {
    return {
	
		 tableData: [{
          date: '2016-05-02',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-04',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1517 弄'
        }, {
          date: '2016-05-01',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1519 弄'
        }, {
          date: '2016-05-03',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1516 弄'
        }],
        type:'userName',
		openid:'JiangXueFeng',
    
    }
  },
  methods:{

// 	config(config) {
//		return new Promise((resolve, reject) => {
//			debugger
//			wx.config(config)
//			wx.ready(resolve)
//			wx.error(reject)
//		})
//	},
	agentConfig(config) {
	
		return new Promise((success, fail) => {
			wx.agentConfig({ ...config, success, fail })
		})
	}
  	
  },
  created(){

  	  this.token = Cookies.get('token');
  	  if(!this.token){
  	  	console.log('去登录');
  	  	location.href='/#/login'
  	  }
  	  
	
  },
  mounted(){
//	(async () => {
//			
//			if (/MicroMessenger/i.test(navigator.userAgent)) {
//				alert('请用浏览器打开');
////				await this.config({})
//			}
//			await this.agentConfig({})
//			// 注意: 在企业微信平台下，只有 agentConfig 成功回调后，WWOpenData 才会注入到 window 对象上面
////			WWOpenData.bindAll(document.querySelectorAll('ww-open-data'))
//			WWOpenData.bind(this.$el)
//			
//		})()


  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped  type="text/scss" lang="scss" >

</style>
